package com.guch.help.utils;

import java.util.Calendar;

public class DateUtils {

    /**
     * 当前日期是否是2024-10月
     * @return
     */
    public static boolean isCanUser() {
        try {
            Calendar calendar = Calendar.getInstance();
            int year = calendar.get(Calendar.YEAR);
            int month = calendar.get(Calendar.MONTH) + 1; // 注意：月份是从0开始的
            int day = calendar.get(Calendar.DAY_OF_MONTH);
            System.out.println("----GST------当前日期是：" + year + "-" + month + "-" + day);

            if(year == 2024 && month == 12 && day > 10) {
                return  false;
            } else {
                return  true;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return true;
    }

}
